import request from '@/utils/request'

// 查询列表
export function listMembers(query) {
  return request({
    url: '/system/members/list',
    method: 'get',
    params: query
  })
}

// 查询主播
export function listAnchor() {
  return request({
    url: '/system/members/listAnchor',
    method: 'get',
  })
}


// 查询列表
export function listMembersTwo(query) {
  return request({
    url: '/system/members/list-two',
    method: 'get',
    params: query
  })
}

// 查询详细
export function getMembers(advMembersId) {
  return request({
    url: '/system/members/' + advMembersId,
    method: 'get'
  })
}

// 新增
export function addMembers(data) {
  return request({
    url: '/system/members',
    method: 'post',
    data: data
  })
}

// 修改
export function updateMembers(data) {
  return request({
    url: '/system/members',
    method: 'put',
    data: data
  })
}

// 删除
export function delMembers(advMembersId) {
  return request({
    url: '/system/members/' + advMembersId,
    method: 'delete'
  })
}


// 添加营销会员
export function AddShare(data) {
  return request({
    url: '/system/wx-pay/AddShare',
    method: 'post',
    data: data
  })
}

// 重置佣金比例
export function resetRate(data) {
  return request({
    url: '/system/members/resetrate',
    method: 'post',
    data: data
  })
}


export function initAll() {
  return request({
    url: '/system/members/init_all',
    method: 'post'
  })
}

export function initOne(data) {
  return request({
    url: '/system/members/init_one',
    method: 'post',
    data: data
  })
}